#pragma once

#include "../SGD Wrappers/SGD_Handle.h"
#include "../SGD Wrappers/SGD_Color.h"
#include <string>

class BitmapFont
{
public:
	BitmapFont() = default;
	~BitmapFont() = default;

	//Init and Terminate
	void Initialize(std::string file);
	void Terminate();

	//Draw
	void Draw(const char* output, int x, int y,
		float scale, SGD::Color color) const;

private:

	//Character struct
	struct Character
	{
		int x;
		int y;
		int width;
		int height;
		int xOffset;
		int yOffset;
		int xAdvance;
		Character() = default;
		Character(int xP, int yP, int w, int h, int xO, int yO, int xA)
			: x(xP), y(yP), width(w), height(h), xOffset(xO), yOffset(yO), xAdvance(xA) {}
	};

	Character charArray[256];
	SGD::HTexture image = SGD::INVALID_HANDLE;
};

